<template>
  <div>
    <transition :name="slide">
      <keep-alive>
        <router-view/>
      </keep-alive>
    </transition>
  </div>
</template>

<script>
export default {
  name: "Index",
  data() {
    return {
      slide: 'van-slide-right'
    }
  },
  watch: {
    $route(to) {
      if (to.path !== '/index/profileIndex/profile') {
        this.slide = 'van-slide-right'
      } else {
        this.slide = 'van-slide-left'
      }
    }
  }
}
</script>

<style scoped>

</style>
